package com.wzz.seckillone.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wzz.seckillone.pojo.*;
import com.wzz.seckillone.vo.GoodsVo;
import com.wzz.seckillone.vo.OrderVo;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jobob
 * @since 2021-11-08
 */
public interface SeckillOrderService extends IService<SeckillOrder> {

    /**
     * @Method
     * @Author wzz
     * @Version  1.0
     * @Description 根据userid 和  商品id查询数据
     * @param
     * @Return
     * @Exception
     * @Date 2022/3/18 20:32
     */
    SeckillOrder getSeckillOrderByGoodsIdAndUserId(String goodsId, String userId);


    /**
     * @Method
     * @Author wzz
     * @Version  1.0
     * @Description 扣库存 保存订单
     * @param
     * @Return
     * @Exception
     * @Date 2022/3/19 11:08
     */
    Order doSecKill(User user, GoodsVo goodsVo);

    OrderVo getOrderDetailsByOrderId(String orderId);

    String getResult(User user, String goodsId);
}
